1. Field of the Invention
This invention relates to a coding method and a coding system, and a decoding method and a decoding system, and is applicable to for example, a variable length coding method and a variable length coding system as well as a variable length decoding method and a variable length decoding system for orthogonally transformed picture signals.
2. Description of the Related Art
Heretofore, there have been constructed video signal transmission systems for transmitting video signals representing motion pictures to remote places, such as a video conference system and videophone. In the video signal transmission systems, video signals are coded by using the line correlation and inter frame correlation of the video signals in order to efficiently use a transmission path, thereby improving the transmission efficiency of significant information.
For example, intra frame coding uses the line correlation of video signals. Therefore, as shown in FIGS. 1A and 1B, when transmitting pictures PC1, PC2, PC3, . . . at time points t=t.sub.1, t.sub.2, t.sub.3, . . . , constituting a motion picture sequence, the picture data to be transmitted is one-dimensionally coded in the same scanning line before transmission thereof.
Inter frame coding improves compressibility by using the inter frame correlation of video signals to obtain picture data PC12, PC23, . . . having differences in pixel data between successively adjacent pictures PC1 and PC2, PC2 and PC3, . . . .
Thereby, the video signal transmission system is constituted to code the picture data for pictures PC1, PC2, PC3, . . . , with high efficiency into digital data of much less quantity than the uncoded picture data, and to send the digital data to a transmission path.
FIG. 2 shows how a picture sequence is intra frame coded or inter frame coded and transformed into three types of frames (macroblock) such as an intra frame predicted frame, frame, and forward, backward, and bidirectional inter frame predicted frame. In FIG. 2, 15 frame periods (frames F0 to F14) are used as one unit for coding.
For this example, the frame F2 is intra frame coded and is called "an intra picture". The frames F5, F8, F11, and F14 are predicted only from the frames F2, F5, F8, and F11 located ahead of the above frames respectively, and are called "predicted pictures".
The remaining frames F0, F1, F3, F4, F6, F7, F9, F10, F12, and F13 are predicted by frames located ahead of the above frames, those located behind the above frames, or those located at the both sides of the above frames as well as inter frame coded, and are called "bidirectional pictures".
FIG. 3 shows a video signal transmission system. The video signal transmission system 1 has a coding device 1A for transmitting data and a decoding device 1B for receiving coded data.
After the coding device 1A converts an input video signal VD via a preprocessing circuit 2 into a luminance signal SY and color difference signal SC, these are converted into an 8-bit digital luminance signal DY and color difference signal DC by the analog to digital conversion circuits 3 and 4.
Then, in the coding device 1A the digital luminance signal DY and digital color difference signal DC are written into a luminance signal frame memory 5A and color difference signal frame memory 5B of a frame memory 5, respectively, and thereafter the picture data is transformed from a frame format into a block format in a format conversion circuit 6.
In the coding device 1A the picture data transformed into the block format is input to an encoder 7, and the picture data is highly efficiently coded to generate a bit stream which is transmitted to a decoding device 1B via a communication path and recording media 8.
The encoder 7 is composed of a hybrid coder 7A for discrete cosine transforming the intra frame or inter frame coded (forward, backward, or bidirectional predicted) picture data, and thereafter quantizing the picture data, as well as a variable length coding apparatus 7B for variable length coding and outputting the quantized data.
The decoding device 1B decodes the bit stream taken from the recording media 8 by performing an inverse procedure to the coding device 1A. That is, the decoding device 1B inverse transforms the bit stream decoded by a decoder 9 so as to restore it, and transforms it from the block format into the frame format in a format transform circuit 10.
Then, in the decoding device 1B the digital luminance signal DY and digital color difference signal DC transformed into the frame format are written into a luminance signal frame memory 11A and a color difference signal frame memory 11B, respectively.
Thereafter, in the decoding device 1B, the above signals are converted into analog signals SY and SC via digital to analog conversion circuits 12 and 13, and the decoding device 1B inputs the signal to a post processing circuit 14 to obtain an output picture and output it as an output video signal VO.
The video signal transmission system 1 is constituted so as to transmit or receive data through a series of such processes.
In this connection, the video signal transmission system 1 processes the data of a frame picture in the structure shown in FIGS. 4A to 4C. First, the data for a frame picture is divided into N slices as shown in FIG. 4A. Each slice includes M macroblocks as shown in FIG. 4B and each macroblock includes luminance signal data Y1 to Y4 corresponding to 8.times.8 pixels and color difference data Cb and Cr corresponding to the total pixel data as shown in FIG. 4C.
In this case, the picture data stream in each slice is arranged so that picture data follows in macroblocks of 16.times.16 pixels, and also follows in microblocks of 8.times.8 pixels in each macroblock in order of raster scanning.
The macroblock uses picture data (Y1 to Y4) for 16.times.16 pixels following in the horizontal and vertical scanning directions for a luminance signal as one unit, but uses one microblock Cr or Cb assigned to the data for 16.times.16 pixels as a unit, because the data quantity is decreased and thereafter time base multiplexed for two color difference signals corresponding to the picture data (Y1 to Y4) for 16.times.16 pixels.
For the coding device 1A, only one type of variable length coding (VLC) apparatus 7B of the encoder 7 for high efficiency coding picture data is given as a conversion table (hereinafter referred to as "VLC table") used for variable length coding quantized data independent of the type of picture processed. For the encoder 7 based on MPEG1 (Moving Picture Experts Group 1), for example, the VLC table is constituted in accordance with the quantized data generated through inter frame coding.
However, the quantization data generated by inter frame coding does not always have the same frequency distribution as the quantization data generated by intra frame coding. That is, when considering the quantized data generated by intra frame coding as a macroblock, it is very similar to the quantized data generated by inter frame coding in composition, but a considerably large difference is found between them in the overall composition (or inclination). Therefore, a high efficiency coding cannot be expected merely from directly applying the VLC table prepared for inter frame coding when processing the quantized data generated through intra frame coding.